Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable21] Add database ratelimiting backend #28815

Merged
merged 1 commit into from
Sep 13, 2021
Merged

Conversation

LukasReschke
Copy link
Member

Backport of #28728

@LukasReschke
Copy link
Member Author

LukasReschke commented Sep 13, 2021

/home/runner/work/server/server/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php:78:6:error - UndefinedInterfaceMethod: Method OCP\DB\QueryBuilder\IQueryBuilder::executeStatement does not exist
/home/runner/work/server/server/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php:90:18:error - UndefinedInterfaceMethod: Method OCP\DB\QueryBuilder\IQueryBuilder::executeQuery does not exist
/home/runner/work/server/server/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php:122:6:error - UndefinedInterfaceMethod: Method OCP\DB\QueryBuilder\IQueryBuilder::executeStatement does not exist
Please run: bash build/autoloaderchecker.sh

Copy link
Member Author

@LukasReschke LukasReschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test plan:

  • Disable the memory cache in config.php
  • Enable the "Q&A Testing App" in the app settings
  • Go to /index.php/apps/testing/userAndAnonProtected and click a few times. Verify that the requests fails due to hitting the ratelimit.
  • Verify that expired ratelimit entries are removed on requests

In case no distributed memory cache is specified this adds
a database backend for ratelimit purposes.

Signed-off-by: Lukas Reschke <[email protected]>
@LukasReschke LukasReschke force-pushed the backport/28728/stable21 branch from 74bfeb1 to f416cac Compare September 13, 2021 14:46
@LukasReschke LukasReschke marked this pull request as ready for review September 13, 2021 15:01
@blizzz blizzz merged commit 7997483 into stable21 Sep 13, 2021
@blizzz blizzz deleted the backport/28728/stable21 branch September 13, 2021 16:07
@blizzz blizzz mentioned this pull request Sep 23, 2021
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants